numBands = 32;
range = [0,4000];
normalization = "none";
fftLength= 1024;
fs=8000;
[fb,cf,bw] = designAuditoryFilterBank(fs, ...
    "FrequencyScale","erb", ...
    "FFTLength",fftLength, ...
    "NumBands",numBands, ...
    "FrequencyRange",range, ...
    "Normalization",normalization);
numPoints = size(fb,2);
F=1:numPoints;
plot(F,fb.');
grid on
title("ERB Filter Bank")
xlabel("Frequency (Hz)");
saveas(gcf,"erb-fbank","jpg");
format("short");
v=round(fb,4)
writematrix(v,"erb-fbank-fb.txt",'delimiter','tab');
writematrix(cf,"erb-fbank-cf.txt",'delimiter','tab');
writematrix(bw,"erb-fbank-bw.txt",'delimiter','tab');